<?

REQUIRE("../../protect/connect_jeu.php");

$query="SELECT ville_id,ville_proprio, ville_population, ville_Timpot, ville_population, ((ville_population*(ville_timpot/100))*ville_t_richesse) FROM sdville WHERE ville_timpot!=0 ORDER BY ville_proprio";
//0=ID, 1=Proprietaire, 2=Taux impot, 3= population
$resultat=mysql_query($query);

WHILE ($element=mysql_fetch_array($resultat)){
      $query="UPDATE sduser_perso SET perso_lorin=perso_lorin+$element[5] WHERE perso_id=$element[1]";
      $resultat2=mysql_query($query);
}



?>
